﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WTest.Model
{
    public class News
    {
        public News()
        {
            News_CId = 23;
            News_Status = 1;
            News_Hits = new Random(DateTime.Now.Millisecond).Next(100, 500);
            News_Stars = new Random(DateTime.Now.Millisecond).Next(1, 5);
        }

        public int News_CId { get; set; }
        public string News_Name { get; set; }    //名称
        public string News_Remark { get; set; }  //简介
        public string News_Content { get; set; } //内容
        public int News_Status { get; set; }     //1
        public long News_AddTime { get; set; }   //2
        public string TempUrl { get; set; }      //3
        public int News_Hits { get; set; }
        public int News_Stars { get; set; }

        public static void Insert(News n)
        {
            //string strSql = string.Format("insert into ff_news (news_cid, news_name, news_remark, news_content, news_status, news_addtime,news_hits,news_stars)"
            //    + "values({0},'{1}','{2}','{3}',{4},{5},{6},{7})", n.News_CId, n.News_Name, n.News_Remark, n.News_Content, n.News_Status, n.News_AddTime, n.News_Hits, n.News_Stars);
            //MySqlHelper.ExecuteNonQuery(System.Data.CommandType.Text, strSql.ToString(), null);
        }
    }
}
